]> bicyclesonthemoon.info Git - ott/mirror/commitdiff
Finished build mechanism for now.
authorb <rowerynaksiezycu@gmail.com>
Mon, 26 Sep 2022 20:56:37 +0000 (20:56 +0000)
committerb <rowerynaksiezycu@gmail.com>
Mon, 26 Sep 2022 20:56:37 +0000 (20:56 +0000)
makefile
makefile.1.mak
ottmirror.1.conf [new file with mode: 0644]
ottmirror.1.cron [new file with mode: 0644]
settings-release.txt
settings.txt
www/ottmirror/index.htm

index b01766f2aac3d8903327b00f112ac28ce0b51dd7..d666506d93caf9daf3a69b3440cbf22ff67c00a3 100644 (file)
--- a/makefile
+++ b/makefile
@@ -38,6 +38,7 @@ MKDIR=/usr/bin/mkdir
 CP   =/usr/bin/cp
 RM   =/usr/bin/rm
 CHMOD=/usr/bin/chmod
+SUDO =sudo
 
 BIN_PATH      = /botm/bin/ottmirror
 LOG_PATH      = /botm/log/ottmirror
@@ -55,7 +56,12 @@ WWW_IMG_PATH  = /botm/www/1190/ott/image
 WWW_INF_PATH  = /botm/www/1190/ott/otterinf
 WWW_LIST_PATH = /botm/www/1190/ott/postlist
 WWW_SIG_PATH  = /botm/www/1190/ott/sig
+WWW_SRC_PATH  = /botm/www/1190/ott/src
 WWW_UP_PATH   = /botm/www/1190/ott/np
+WWW_DESC_PATH = /botm/www/1190/ottmirror
+
+CONF = /botm/etc/www/conf/1190/ottmirror.conf
+CRON = /etc/cron.d/ottmirror.cron
 
 
 # The configuration tool
@@ -73,6 +79,8 @@ index.1.awk\
 index.1.cpp\
 mpview.1.cpp\
 mview.1.cpp\
+ottmirror.1.conf\
+ottmirror.1.cron\
 pm.1.awk\
 post.1.awk\
 post.1.cpp\
@@ -89,6 +97,8 @@ index.awk\
 index.cpp\
 mpview.cpp\
 mview.cpp\
+ottmirror.conf\
+ottmirror.cron\
 pm.awk\
 post.awk\
 post.cpp\
@@ -150,6 +160,42 @@ verify.awk\
 view\
 view.awk
 
+SRC=\
+agpl.txt\
+bb2html.awk\
+bot2.1.awk\
+bot2.1.cpp\
+bot3.1.cpp\
+findlatest.awk\
+findpost.1.cpp\
+image.cpp\
+index.1.awk\
+index.1.cpp\
+list.awk\
+makefile\
+makefile.1.mak\
+mpview.1.cpp\
+mview.1.cpp\
+mview.awk\
+ottmirror.1.conf\
+ottmirror.1.cron\
+pm.1.awk\
+post.1.awk\
+post.1.cpp\
+posted.1.cpp\
+posted.awk\
+preview.1.awk\
+redirect.cpp\
+settings-release.txt\
+settings.txt\
+update.1.cpp\
+upload.awk\
+verify.awk\
+view.1.cpp\
+view.awk\
+www
+
+
 DIR=\
 $(BIN_PATH)\
 $(LOG_PATH)\
@@ -167,8 +213,9 @@ $(WWW_IMG_PATH)\
 $(WWW_INF_PATH)\
 $(WWW_LIST_PATH)\
 $(WWW_SIG_PATH)\
+$(WWW_SRC_PATH)\
 $(WWW_UP_PATH)\
-
+$(WWW_DESC_PATH)
 
 HIDDEN_DIR=\
 $(TMP_PATH)\
@@ -199,17 +246,27 @@ mktree:
 cp_bin: $(BIN) setuid | mktree
        $(CP) $(BIN) $(BIN_PATH)
 
+cp_conf: ottmirror.conf
+       $(CP) ottmirror.conf $(CONF)
+
+cp_cron: ottmirror.cron
+       $(SUDO) $(CP) ottmirror.cron $(CRON)
+
+cp_src: $(SRC) | mktree
+       $(RM) -rf $(WWW_SRC_PATH)/*
+       $(CP) -r $(SRC) $(WWW_SRC_PATH)
+
 cp_www: | mktree
        $(CP) -r www/ott/* $(WWW_PATH)
 
-install: cp_bin cp_www
+cp_www_desc: | mktree
+       $(CP) -r www/ottmirror/* $(WWW_DESC_PATH)
+
+install: cp_bin cp_www cp_www_desc cp_src cp_conf cp_cron
        
 
 clean:
        $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
-PHONY: all clean setuid mktree cp_bin cp_www install
-
-# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
-
+PHONY: all clean setuid mktree cp_bin co_conf cp_cron cp_src cp_www cp_www_desc install
 
index b789fd5f4ef1cc6576910ef9f9e9bb78bf63a5e5..07c1a9f7e7a330c1e6a1d1d5814675a343bae46c 100644 (file)
@@ -38,6 +38,7 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt
 ###MAKE_CP:    CP    = rm
 ###MAKE_RM:    RM    = rm
 ###MAKE_CHMOD: CHMOD = chmod
+###MAKE_SUDO:  SUDO  = sudo
 
 ###MAKE_BIN_PATH:      BIN_PATH      = /botm/bin/ottmirror
 ###MAKE_LOG_PATH:      LOG_PATH      = /botm/log/ottmirror
@@ -55,7 +56,12 @@ CONFIGFILE = settings-$(TARGET).txt settings.txt
 ###MAKE_WWW_INF_PATH:  WWW_INF_PATH  = /botm/www/1190/ott/otterinf
 ###MAKE_WWW_LIST_PATH: WWW_LIST_PATH = /botm/www/1190/ott/postlist
 ###MAKE_WWW_SIG_PATH:  WWW_SIG_PATH  = /botm/www/1190/ott/sig
+###MAKE_WWW_SRC_PATH:  WWW_SRC_PATH  = /botm/www/1190/ott/src
 ###MAKE_WWW_UP_PATH:   WWW_UP_PATH   = /botm/www/1190/ott/np
+###MAKE_WWW_DESC_PATH: WWW_DESC_PATH = /botm/www/1190/ottmirror
+
+###MAKE_CONF: CONF = /botm/etc/www/conf/1190/ottmirror.conf
+###MAKE_CRON: CRON = /etc/cron.d/ottmirror.conf
 
 
 # The configuration tool
@@ -73,6 +79,8 @@ index.1.awk\
 index.1.cpp\
 mpview.1.cpp\
 mview.1.cpp\
+ottmirror.1.conf\
+ottmirror.1.cron\
 pm.1.awk\
 post.1.awk\
 post.1.cpp\
@@ -89,6 +97,8 @@ index.awk\
 index.cpp\
 mpview.cpp\
 mview.cpp\
+ottmirror.conf\
+ottmirror.cron\
 pm.awk\
 post.awk\
 post.cpp\
@@ -150,6 +160,42 @@ verify.awk\
 view\
 view.awk
 
+SRC=\
+agpl.txt\
+bb2html.awk\
+bot2.1.awk\
+bot2.1.cpp\
+bot3.1.cpp\
+findlatest.awk\
+findpost.1.cpp\
+image.cpp\
+index.1.awk\
+index.1.cpp\
+list.awk\
+makefile\
+makefile.1.mak\
+mpview.1.cpp\
+mview.1.cpp\
+mview.awk\
+ottmirror.1.conf\
+ottmirror.1.cron\
+pm.1.awk\
+post.1.awk\
+post.1.cpp\
+posted.1.cpp\
+posted.awk\
+preview.1.awk\
+redirect.cpp\
+settings-release.txt\
+settings.txt\
+update.1.cpp\
+upload.awk\
+verify.awk\
+view.1.cpp\
+view.awk\
+www
+
+
 DIR=\
 $(BIN_PATH)\
 $(LOG_PATH)\
@@ -167,8 +213,9 @@ $(WWW_IMG_PATH)\
 $(WWW_INF_PATH)\
 $(WWW_LIST_PATH)\
 $(WWW_SIG_PATH)\
+$(WWW_SRC_PATH)\
 $(WWW_UP_PATH)\
-
+$(WWW_DESC_PATH)
 
 HIDDEN_DIR=\
 $(TMP_PATH)\
@@ -199,17 +246,27 @@ mktree:
 cp_bin: $(BIN) setuid | mktree
        $(CP) $(BIN) $(BIN_PATH)
 
+cp_conf: ottmirror.conf
+       $(CP) ottmirror.conf $(CONF)
+
+cp_cron: ottmirror.cron
+       $(SUDO) $(CP) ottmirror.cron $(CRON)
+
+cp_src: $(SRC) | mktree
+       $(RM) -rf $(WWW_SRC_PATH)/*
+       $(CP) -r $(SRC) $(WWW_SRC_PATH)
+
 cp_www: | mktree
        $(CP) -r www/ott/* $(WWW_PATH)
 
-install: cp_bin cp_www
+cp_www_desc: | mktree
+       $(CP) -r www/ottmirror/* $(WWW_DESC_PATH)
+
+install: cp_bin cp_www cp_www_desc cp_src cp_conf cp_cron
        
 
 clean:
        $(RM) -f $(TO_GENERATE) $(PROGR_NORMAL) $(PROGR_CGI)
 
-PHONY: all clean setuid mktree cp_bin cp_www install
-
-# all: bot2 bot3 findpost image view mview mpview index update post posted redirect enable
-
+PHONY: all clean setuid mktree cp_bin co_conf cp_cron cp_src cp_www cp_www_desc install
 
diff --git a/ottmirror.1.conf b/ottmirror.1.conf
new file mode 100644 (file)
index 0000000..9cdc5ab
--- /dev/null
@@ -0,0 +1,24 @@
+# The OTT mirror
+
+Alias /ott/log ###CONF_log;
+<Directory ###CONF_log;>
+       Require all granted
+       Options Indexes
+       Order allow,deny
+       Allow from all
+</Directory>
+
+
+ScriptAlias /ott/index ###CONF_index;
+ScriptAlias /ott/mpview ###CONF_mpview;
+ScriptAlias /ott/mview ###CONF_mview;
+ScriptAlias /ott/post ###CONF_post;
+ScriptAlias /ott/posted ###CONF_posted;
+ScriptAlias /ott/redirect ###CONF_redirect;
+ScriptAlias /ott/update ###CONF_update;
+ScriptAlias /ott/view ###CONF_view;
+ScriptAliasMatch ^/ott/?$ ###CONF_index;
+
+<Directory ###CONF_bin;>
+       Require all granted
+</Directory>
diff --git a/ottmirror.1.cron b/ottmirror.1.cron
new file mode 100644 (file)
index 0000000..3f96c51
--- /dev/null
@@ -0,0 +1,23 @@
+# OTT MIRROR BOTS
+
+#fast blitz
+###cron_blitz_schedule; ###cron_user; ###bin_bot2_path; ###cron_blitz_options; -i1
+
+#slow past reketckup
+###cron_past_reketchup_schedule; ###cron_user; ###bin_bot2_path; ###cron_past_reketchup_options; -i1
+
+#present ketchup
+###cron_present_ketchup_schedule; ###cron_user; ###bin_bot2_path; ###cron_present_ketchup_options; -i2
+
+#present reketchup
+###cron_present_reketchup_schedule; ###cron_user; ###bin_bot2_path; ###cron_present_reketchup_options; -i3
+
+#mustard post
+###cron_blitz_schedule; ###cron_user; ###bin_bot3_path;
+
+#log relocation
+#TODO: Replace with better mechanism!
+###cron_log_relocation_schedule; ###cron_user; ###mv; ###log_bot2_path;1 ###log_bot2_path;1.lastweek
+###cron_log_relocation_schedule; ###cron_user; ###mv; ###log_bot2_path;2 ###log_bot2_path;2.lastweek
+###cron_log_relocation_schedule; ###cron_user; ###mv; ###log_bot2_path;3 ###log_bot2_path;3.lastweek
+###cron_log_relocation_schedule; ###cron_user; ###mv; ###log_bot3_path; ###log_bot3_path;.lastweek
index 01cb0ab7e2bd181eca84ee32b5487d3e25b20206..34b6739034e0bad431b50998fb5f2479845589f3 100644 (file)
@@ -1,14 +1,28 @@
+# Name must be unique, not shared with other projects / targets.
+# otherwise config files will collide
+name: ottmirror
+
+# target name. settings file (THIS FILE) is "settings-TARGET_NAME.txt"
+# where TARGET_NAME is the value
 target: release
+
+# The configuration tool
+# http://bicyclesonthemoon.info/git/botm-config 
+# alternatively, copy configure.pl to source directory.
 configure: /botm/bin/config/configure.pl
 
 useragent2: bothasar_t (http://1190.bicyclesonthemoon.info/ott/; Time thread mirror bot)
 useragent3: bothasar_p (http://1190.bicyclesonthemoon.info/ott/; Time thread post bot)
 
 bin_path: /botm/bin/ottmirror
+conf_path: /botm/etc/www/conf/1190
+cron_path: /etc/cron.d
 log_path: /botm/log/ottmirror
 mem_path: /botm/data/ottmirror
+src_path: /botm/src/ottmirror
 tmp_path: /botm/tmp/ottmirror
 www_path: /botm/www/1190/ott
+www_desc_path: /botm/www/1190/ottmirror
 
 ict_addr: http://forums.xkcd.com/viewforum.php?f=7
 ott_addr: http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=
@@ -31,17 +45,38 @@ bot3name: bothasar_p
 bot3_url: http://1190.bicyclesonthemoon.info/bothasar_p/
 default_subject: Re: 1190: "Time"
 
+awk: /usr/bin/mawk
 cat: /usr/bin/cat
+chmod: /usr/bin/chmod
+cp: /usr/bin/cp
+ls: /usr/bin/ls
+mkdir: /usr/bin/mkdir
 mv: /usr/bin/mv
 perl: /usr/bin/perl
 rm: /usr/bin/rm
-ls: /usr/bin/ls
+sudo: sudo
 wget: /usr/bin/wget
-awk: /usr/bin/mawk
-chmod: /usr/bin/chmod
-mkdir: /usr/bin/mkdir
-cp: /usr/bin/cp
 
 CC: g++
 CF: -g -Wall -Wno-format-truncation
 L_CGI: -lcgi
+
+
+# "#" in schedule to disable
+cron_user: b
+
+cron_blitz_schedule: ###2,17,32,47 * * * *
+cron_blitz_options: -o0 -m15 -w9 -d -a -b
+
+cron_past_reketchup_schedule: #23 * * * *
+cron_past_reketchup_options: -o0 -m3 -p2 -w9 -v5 -d -a -b
+
+cron_present_ketchup_schedule: #20,50 * * * *
+cron_present_ketchup_options: -r -o1 -m5 -w9 -v5 -d -a
+
+cron_present_reketchup_schedule: #26 23 * * *
+cron_present_reketchup_options: -r -o5 -m10 -p2 -w9 -v5 -d -a -b
+
+cron_mustard_post_schedule: #26 23 * * *
+
+cron_log_relocation_schedule: #0 0 * * 1
\ No newline at end of file
index 0b95db5f1769b9749efb6553c50a82c38c146598..d2441599aed5f048f16acb557a2ac006debbd681 100644 (file)
@@ -20,12 +20,24 @@ _bin_awk_preview_path= @_PATH($bin_path, preview.awk)
 _bin_awk_upload_path = @_PATH($bin_path, upload.awk)
 _bin_awk_verify_path = @_PATH($bin_path, verify.awk)
 _bin_awk_view_path   = @_PATH($bin_path, view.awk)
-_bin_bot2_path       = @_PATH($bin_path, bot2)
+bin_bot2_path        = @_PATH($bin_path, bot2)
+bin_bot3_path        = @_PATH($bin_path, bot3)
 _bin_findpost_path   = @_PATH($bin_path, findpost)
 _bin_image_path      = @_PATH($bin_path, image)
+_bin_index_path      = @_PATH($bin_path, index)
+_bin_mpview_path     = @_PATH($bin_path, mpview)
+_bin_mview_path      = @_PATH($bin_path, mview)
+_bin_post_path       = @_PATH($bin_path, post)
+_bin_posted_path     = @_PATH($bin_path, posted)
+_bin_redirect_path   = @_PATH($bin_path, redirect)
+_bin_update_path     = @_PATH($bin_path, update)
+_bin_view_path       = @_PATH($bin_path, view)
 
-_log_bot2_path = @_PATH($log_path, bot2.log.)
-_log_bot3_path = @_PATH($log_path, bot3.log)
+_conf_path = @_PATH($conf_path, $name\.conf)
+_cron_path = @_PATH($cron_path, $name\.cron)
+
+log_bot2_path = @_PATH($log_path, bot2.log_)
+log_bot3_path = @_PATH($log_path, bot3.log)
 
 _mem_last_path     = @_PATH($mem_path, lasttime.)
 _mem_lasttm_path_3 = @_PATH($mem_path, bot3last)
@@ -70,6 +82,7 @@ _www_info_path    = @_PATH($www_path, info.htm)
 _www_list_path    = @_PATH($www_path, postlist)
 _www_post_path    = @_PATH($www_path, post.htm)
 _www_sig_path     = @_PATH($www_path, sig)
+_www_src_path     = @_PATH($www_path, src)
 _www_top_path     = @_PATH($www_path, top)
 _www_up_path      = @_PATH($www_path, np)
 
@@ -94,11 +107,15 @@ MAKE_CP     = CP   =$cp
 MAKE_MKDIR  = MKDIR=$mkdir
 MAKE_PERL   = PERL =$perl
 MAKE_RM     = RM   =$rm
+MAKE_SUDO   = SUDO =$sudo
 
 MAKE_CC    = CC   =$CC
 MAKE_CF    = CF   =$CF
 MAKE_L_CGI = L_CGI=$L_CGI
 
+MAKE_CONF = CONF = $_conf_path
+MAKE_CRON = CRON = $_cron_path
+
 MAKE_BIN_PATH      = BIN_PATH      = $bin_path
 MAKE_LOG_PATH      = LOG_PATH      = $log_path
 MAKE_MEM_PATH      = MEM_PATH      = $mem_path
@@ -115,7 +132,22 @@ MAKE_WWW_IMG_PATH  = WWW_IMG_PATH  = $_www_img_path
 MAKE_WWW_INF_PATH  = WWW_INF_PATH  = $_www_inf_path
 MAKE_WWW_LIST_PATH = WWW_LIST_PATH = $_www_list_path
 MAKE_WWW_SIG_PATH  = WWW_SIG_PATH  = $_www_sig_path
+MAKE_WWW_SRC_PATH  = WWW_SRC_PATH  = $_www_src_path
 MAKE_WWW_UP_PATH   = WWW_UP_PATH   = $_www_up_path
+MAKE_WWW_DESC_PATH = WWW_DESC_PATH = $www_desc_path
+
+
+CONF_log      = $log_path
+CONF_bin      = $bin_path
+CONF_index    = $_bin_index_path
+CONF_mpview   = $_bin_mpview_path
+CONF_mview    = $_bin_mview_path
+CONF_post     = $_bin_post_path
+CONF_posted   = $_bin_posted_path
+CONF_redirect = $_bin_redirect_path
+CONF_update   = $_bin_update_path
+CONF_view     = $_bin_view_path
+
 
 AWK_default_subject_encoded= \t@_AWK_DEFINE_STR(default_subject_encoded,$_default_subject_encoded)
 AWK_failpath       = \t@_AWK_DEFINE_STR(failpath,       $_mem_fail_path_)
@@ -157,8 +189,8 @@ C_OTT_ADDRESS  = @_C_DEFINE_STR(OTT_ADDRESS,  $ott_addr)
 C_OTT_ADDRESS  = @_C_DEFINE_STR(OTT_ADDRESS,  $ott_addr)
 
 # dir-log
-C_LOG_PATH_2 = @_C_DEFINE_STR(LOG_PATH, $_log_bot2_path)
-C_LOG_PATH_3 = @_C_DEFINE_STR(LOG_PATH, $_log_bot3_path)
+C_LOG_PATH_2 = @_C_DEFINE_STR(LOG_PATH, $log_bot2_path)
+C_LOG_PATH_3 = @_C_DEFINE_STR(LOG_PATH, $log_bot3_path)
 
 # dir-mem
 C_FAIL_PATH_3   = @_C_DEFINE_STR(FAIL_PATH,     $_mem_fail_path_)
@@ -232,6 +264,6 @@ C_AWK_PREVIEW = @_C_DEFINE_STR(AWK_PREVIEW, $_bin_awk_preview_path)
 C_AWK_UPLOAD  = @_C_DEFINE_STR(AWK_UPLOAD,  $_bin_awk_upload_path)
 C_AWK_VERIFY  = @_C_DEFINE_STR(AWK_VERIFY,  $_bin_awk_verify_path)
 C_AWK_VIEW    = @_C_DEFINE_STR(AWK_VIEW,    $_bin_awk_view_path)
-C_BOT_PATH_2  = @_C_DEFINE_STR(BOT_PATH,    $_bin_bot2_path)
+C_BOT_PATH_2  = @_C_DEFINE_STR(BOT_PATH,    $bin_bot2_path)
 
 C_ = @_C_DEFINE_STR(uvw, $xyz)
index 8b9f0266a3666d210e02e01fc2352c9f5922e5aa..b81f79d3225854f51866da6411f7fe921ccb34a3 100644 (file)
@@ -7,12 +7,16 @@
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8"></head>\r
 <body>\r
 <a href="http://1190.bicyclesonthemoon.info/"><img src="botmlogo2.png" alt="1190.bicyclesonthemoon.info" border="0"></a>\r
+<h1>The text in this article is outdated!</h1>\r
+<p>What is described was true before moving to this new server.\r
+Please wait for an updated description. Disregard whatever is written below.</p>\r
+\r
 <h1>You can have your own OTT mirror now!</h1>\r
 <div style="max-width: 600000px">\r
 <p>If you want to run your own copy of the <a href="http://1190.bicyclesonthemoon.info/ott/">ЯOЯЯIM TTO</a>, you\r
 can, because I made it available. Follow these instructions to download and\r
 setup your own ЯOЯЯIM TTO.</p>\r
-<p>This is about version 1.6.</p>\r
+<p>This is about version <= 1.6.</p>\r
 \r
 <h2>Read this</h2>\r
 <p>To have the mirror rendered correctly after migration from version pre-1.5\r
@@ -270,7 +274,7 @@ rendered as good as in the original.</p> -->
 \r
 <h2>Changes</h2>\r
 <ul>\r
-       <li>v1.6 (20.06.2016):</a>\r
+       <li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.6">v1.6 (20.06.2016):</a>\r
        <ul>\r
                <li>Changed CSS to make it work with the new phpBB</li>\r
        </ul></li>\r