summaryrefslogtreecommitdiffhomepage
path: root/subr.rtl
AgeCommit message (Collapse)AuthorFilesLines
2023-03-26Print group file pathname in ./pkgtool.sh -i output.Lucía Andrea Illanes Albornoz2-1/+21
2023-03-26subr.ex/ex_pkg_env.subr: add header.Lucía Andrea Illanes Albornoz1-3/+3
subr.rtl/rtl_fetch_git.subr: cleanup.
2023-03-21subr.rtl/rtl_fetch_git.subr: don't pass --remote to git-submodule(1).Lucía Andrea Illanes Albornoz1-1/+1
2023-03-21subr.rtl/rtl_fetch_git.subr: pass --rebase to git-pull(1) to deal w/ push -f.Lucía Andrea Illanes Albornoz1-30/+43
subr.rtl/rtl_fetch_git.subr: pass --remote to git-submodule(1) update. subr.rtl/rtl_fetch_git.subr: minor code cleanup.
2023-03-21Document subr.rtl/*.subr functions, pt. IV.Lucía Andrea Illanes Albornoz8-107/+246
2023-03-21Document subr.rtl/*.subr functions, pt. III.Lucía Andrea Illanes Albornoz1-11/+169
2023-03-20Document subr.rtl/*.subr functions, pt. II.Lucía Andrea Illanes Albornoz3-1/+137
2023-03-20Document subr.rtl/*.subr functions, pt. I.Lucía Andrea Illanes Albornoz7-75/+327
2023-03-20Use "Returns:" vs. "Return:" in function documentation.Lucía Andrea Illanes Albornoz1-0/+6
2023-03-20Implements 256-colour themes.Lucía Andrea Illanes Albornoz1-4/+50
2023-03-14subr.rtl/rtl_list.subr:rtl_lfilter{,2}(): fix bug when ${_rlf2_filter} is empty.Lucía Andrea Illanes Albornoz1-1/+1
2023-03-13Followup to <fd38dc025f5d31890abbf3d48c597114203b1421>.Lucía Andrea Illanes Albornoz1-0/+25
2023-02-22Exit correctly on ^C and -V [..].Lucía Andrea Illanes Albornoz1-1/+3
2023-02-19Add copyright legends to all files.Lucía Andrea Illanes Albornoz14-0/+14
2023-02-19Reject empty variables from the command line.Lucía Andrea Illanes Albornoz1-0/+16
2023-02-18subr.rtl/rtl_fetch_git.subr: fix typo.Lucía Andrea Illanes Albornoz1-1/+1
2023-02-18Add textwidth=0 to Vim modelines.Lucía Andrea Illanes Albornoz13-13/+13
2023-02-17Make everything a bit faster.Lucía Andrea Illanes Albornoz14-898/+1328
0) Issues several prayers and sacrifices to Enki under threat of a terrible deluge sent down by Ellil 1) Convert fork-write/read exprs to be non-forking 2) Pass mostly everything by reference 3) Don't bother cleaning the variable namespace because Bourne shell is an abomination 4) Removes broken ./pkgtool.sh -s, --restart-at, --update-diff & ./build.sh --dump-{in,on-abort} 5) Cleanup
2022-11-12subr.rtl/rtl_install_v2.subr: fix typo.Lucía Andrea Illanes Albornoz1-1/+1
2021-09-09subr.rtl/rtl_install_v2.subr:rtl_install_v2(): correctly set from ${IFS} ↵Lucio Andrés Illanes Albornoz1-1/+1
(via Redfoxmoon.)
2021-08-27Implements localised message files, pt. II.Lucio Andrés Illanes Albornoz5-34/+37
2021-08-26Implements logging tags, tag sets, and themes.Lucio Andrés Illanes Albornoz6-72/+84
subr/pkgtool_init.subr:pkgtoolp_init_args(): set ${BUILD_HNAME}.
2021-08-26{build,pkgtool}.sh: log environment variables at "notice" level.Lucio Andrés Illanes Albornoz1-5/+5
subr.rtl/rtl_log.subr:${RTL_LOG_MSG_{NOTICE,VERBOSE}_COLOUR}: swap.
2021-08-26Log messages at {info,notice,verbose} and {,-v,-vv}.Lucio Andrés Illanes Albornoz3-3/+4
2021-08-25subr.rtl/rtl_fetch_git.subr:rtlp_fetch_url_git(): attempt to gracefully ↵Lucio Andrés Illanes Albornoz1-4/+25
handle forced Git pushes.
2021-08-24subr.rtl/rtl_install_v2.subr:rtlp_install_fmap_patterns(): only prepend ↵Lucio Andrés Illanes Albornoz1-1/+6
${_rifp2_prefix} given non-absolute ${_rifp2_lhs}.
2021-08-24midipix.env:${DEFAULT_BUILD_VARS}: adds INSTALL_FILES_V2.Lucio Andrés Illanes Albornoz1-2/+2
subr.rtl/rtl_install_v2.subr:rtlp_install_fmap(): fix typo. subr.rtl/rtl_install_v2.subr:rtlp_install_fmap_patterns(): don't prepend ${_rifp2_prefix} w/ %<*>. subr/ex_pkg_exec.subr:exp_pkg_exec_pre(): honour ${PKG_INSTALL_FILES:-} in emitting missing_pkg. subr/pkg_install_files.subr:pkgp_install_files_v2(): initial implementation.
2021-08-24devbuild.sh:devbuild_all(): optionally set -p count from ${1}.Lucio Andrés Illanes Albornoz1-2/+0
etc/README.md: updated. subr.rtl/rtl_install_v2.subr:rtl_install_v2(): remove debugging remnant.
2021-08-24subr.rtl/rtl_install_v2.subr:rtlp_install_fmap_params(): switch to portable ↵Lucio Andrés Illanes Albornoz1-1/+1
[!...] vs. [^...] patterns.
2021-08-24subr.rtl/rtl_filepath.subr:rtl_is_newer(): correctly silence stat(1)'s stderr.Lucio Andrés Illanes Albornoz1-2/+2
2021-08-24subr.rtl/rtl_fileop.subr:rtl_fileop(): implements chgrp.Lucio Andrés Illanes Albornoz1-6/+15
subr.rtl/rtl_fileop.subr:rtl_fileop(): extend touch to accept optional timestamp.
2021-08-24Implements extended ${PKG_INSTALL} DSL, pt. I.Lucio Andrés Illanes Albornoz1-0/+542
2021-08-19subr.rtl/rtl_fetch_git.subr:{rtlp_fetch_url_git,rtl_fetch_mirror_urls_git}() ↵Lucio Andrés Illanes Albornoz1-3/+3
: correctly reference ${_subdir} when {fetching,mirroring}. subr/pkg_fetch_download.subr:pkg_fetch_download_clean_dlcache(): correctly cleanup dlcache wrt. Git repositories.
2021-08-19Switch to portable [!...] vs. [^...] patterns.Lucio Andrés Illanes Albornoz2-11/+11
2021-05-12Implements CMake support.Lucio Andrés Illanes Albornoz2-15/+15
etc/README.md: updated. groups/{000.host_tools,010.host_deps,200.native_packages,800.minipix}.group:${*_SOFORT_NATIVE_{C,CXX,LD}FLAGS}: merged into midipix.env. groups/010.host_deps.group:{clang,cmake_host,libzip,llvm}_host:${PKG_CMAKE_ARGS_EXTRA}: added. groups/010.host_deps.group:cmake_host:${PKG_CONFIGURE_TYPE}: configure w/ cmake. groups/010.host_deps.group:cmake_host:${PKG_INSTALL_FILES}: added. groups/010.host_deps.group:expat_host:${PKG_CONFIGURE_TYPE}: configure w/ autotools. groups/010.host_deps.group:python[23]_host:${PKG_{ENV_VARS_EXTRA,SOFORT_FORCE}}: removed. groups/010.host_deps.group:python[23]_host:${PKG_CONFIGURE_TYPE}: configure w/ sofort. groups/010.host_deps.group:python[23]_host:${PKG_SOFORT_NATIVE_CC}: removed. groups/221.native_packages_dev.group:python[23]:${PKG_SOFORT_FORCE}: removed. groups/221.native_packages_dev.group:python[23]:${PKG_CONFIGURE_TYPE}: configure w/ sofort. groups/231.native_packages_etc.group:{cmake,minizip,openjpeg,tdnf,xpdf}:${PKG_CMAKE_ARGS_EXTRA}: added. groups/231.native_packages_etc.group:cmake:${PKG_CONFIGURE_ARGS}: removed. groups/231.native_packages_etc.group:utf8proc:${PKG_IN_TREE}: don't build in-tree. groups/251.native_packages_lib.group:lib{jpeg_turbo,solv,ssh,zip}:${PKG_CMAKE_ARGS_EXTRA}: added. midipix.env:${DEFAULT_BUILD_VARS}: adds ${PKG_{CMAKE{,_{ARGS{,_EXTRA},LISTFILE}},CONFIGURE_TYPE},SOFORT_NATIVE_{C{C,XX},{C,CXX,LD}FLAGS,LD}}. midipix.env:${DEFAULT_BUILD_VARS}: removes ${PKG_SOFORT_FORCE}. midipix.env:${DEFAULT_{CMAKE_LISTFILE,{CROSS,HOST,NATIVE}_CMAKE}}: added. subr.rtl/rtl_complex.subr:rtl_export_vars(): ignore values during -u. subr.rtl/rtl_platform.subr:rtl_set_vars(): updated. subr/ex_pkg_env.subr:exp_pkg_env_set(): always convert ${PKG_{AR,CC,CXX,PKG_CONFIG,RANLIB}} to absolute pathnames. subr/ex_pkg_env.subr:ex_pkg_env_sofort(): merged into subr/pkg_configure.subr. subr/ex_pkg_restart.subr:ex_pkg_process_restart_spec(): remove extraneous echo. subr/pkg_configure.subr:pkgp_configure_{cmake,sofort}(): initial implementation. subr/pkg_configure.subr:pkg_configure(): attempt configuration using autotools, sofort, or cmake. subr/pkg_configure_autotools.subr: skip if ${PKG_CONFIGURE_TYPE} is set and not "autotools". subr/pkg_fetch_clean.subr: fix typo. vars/{clang_host,cmake{,_host},lib{jpeg_turbo,solv,ssh,zip{,_host}},llvm_host,lolcode,minizip,openjpeg,tdnf,xpdf}.vars: deleted.
2021-05-10Implements {fetch,configure,build,install}_clean.Lucio Andrés Illanes Albornoz3-10/+66
build.sh:buildp_dispatch_fail_pkg(): print NL when writing to ${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}. etc/{README.md,build.usage}: updated. midipix.env: updated. subr.rtl/rtl_complex.subr:rtl_sunset(): initial implementation. subr.rtl/rtl_list.subr:rtl_l{filter[23],length2,lift[23]}(): initial implementation. subr.rtl/rtl_state.subr:rtl_state_test(): take ${_build_steps} vs. ${_build_step}. subr/{build_init,ex_pkg_restart}.subr: splits extended restart syntax processing logic. subr/ex_pkg_exec.subr:ex_pkg_exec(): filter "start". subr/pkg_{build,configure,fetch,install}_clean.subr: initial implementation.
2021-05-07vars/autoconf_2_64_host.vars: updated.Lucio Andrés Illanes Albornoz1-23/+53
subr.rtl/rtl_install.subr: implements -* (rm,) !*=* (mv,) m[0-7]{4}= (chmod,) and o*=* (chown.)
2021-05-07Implements extended -r syntax.Lucio Andrés Illanes Albornoz2-12/+13
build.sh:buildp_ast(): only reset package build step state if ${ARG_RESET_PKG} is 1. etc/{build.usage,README.md}: updated. etc/build.usage.short, subr/build_init.subr: implement short help screen. midipix.env: correctly escape multi-line variable assignment expressions. subr.rtl/rtl_list.subr: updated. subr.rtl/rtl_state.subr:rtl_state_set(): correctly implement invalidation. subr.rtl/rtl_state.subr:rtl_state_test(): honour `LAST'. subr/build_init.subr:buildp_init_getopts(): implements --reset-pkg. subr/build_init.subr:buildp_{expand_restart_{at,recursive},process_restart_spec}(): initial implementation. subr/ex_pkg_{dispatch,env}.subr: updated. subr/ex_pkg_exec.subr:ex_pkg_exec(): honour `ALL' and `LAST'. vars/gcc.vars: updated.
2021-04-06subr.rtl/rtl_fetch{_git,}.subr: split.Lucio Andrés Illanes Albornoz6-294/+315
subr.rtl/rtl_{filepath,complex}.subr: split. subr.rtl/{rtl_filepath,}.subr: split. subr.rtl/rtl_{platform,complex}.subr: split.
2021-04-06pkgtool.sh:pkgtoolp_mirror_fetch(): call pkg_fetch_download_clean_dlcache() ↵Lucio Andrés Illanes Albornoz1-12/+20
post-{archive,Git} mirroring. pkgtool.sh:pkgtoolp_mirror_fetch(): mirror both archive as well as Git URL(s). subr/pkg_configure_patch.subr:pkg_configure_patch(): apply patches from within ${PKG_BASE_DIR} given both ${PKG_FNAME} and ${PKG_URLS_GIT}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): ignore all but last component in ${_subdir}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): create prerequisite directories. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): ignore all but last component in ${_subdir} wrt. ${_cache_dlname}. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): create prerequisite directories wrt. ${_tgtdir}. subr/ex_pkg_env.subr:exp_pkg_env_defaults(): reject absence of ${PKG_SUBDIR} given both ${PKG_FNAME} and ${PKG_URLS_GIT}. subr/pkg_fetch_download.subr:pkg_fetch_download_clean_dlcache(): initial implementation. subr/pkg_fetch_download.subr:pkg_fetch_download(): call pkg_fetch_download_clean_dlcache() post-{archive,Git} download.
2021-04-05subr.rtl/rtl_fetch.subr:rtl_fetch_url_wget(): log actual SHA256 message ↵Lucio Andrés Illanes Albornoz1-2/+8
digest of downloaded file on hash mismatch.
2021-04-05subr.rtl/rtl_fetch.subr:rtl_fetch_url_wget(): delete downloaded file given ↵Lucio Andrés Illanes Albornoz1-4/+7
non-recoverable failure.
2021-03-14pkgtool.sh:pkgtoolp_mirror_fetch(): skip mirroring of Git URL(s) if ↵Lucio Andrés Illanes Albornoz1-0/+2
${PKG_MIRRORS_GIT} specifies `skip'. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): skip attempting to use Git URL(s) mirror if ${_mirrors} specifies `skip'. groups/120.native_runtime.group:{ntctty,psxscl{,_strace}}:${PKG_MIRRORS_GIT}: skip mirroring.
2021-03-13subr.rtl/rtl_complex.subr:rtl_flock_acquire(): change flock(1) conflict exit ↵Lucio Andrés Illanes Albornoz1-1/+1
code to 253 within conformant 0-255 range.
2021-01-24subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): correctly pass ↵Lucio Andrés Illanes Albornoz1-2/+2
${_git_branch:-main} to git-clone(1).
2021-01-24Reimplements Git repository mirroring because Git is a special snowflake.Lucio Andrés Illanes Albornoz1-19/+47
etc/{README.md,pkgtool.usage}: updated. groups/221.native_packages_dev.group:cparser:${PKG_DISABLED}: disabled due to repository unavailability. groups/251.native_packages_lib.group:libfirm:${PKG_DISABLED}: disabled due to repository unavailability. midipix.env:${DEFAULT_BUILD_VARS}: adds MIRRORS_GIT. midipix.env:${DEFAULT_MIRRORS{,_GIT}}: split; mirror Git repositories via https://midipix.lucioillanes.de/repos_git/. pkgtool.sh:pkgtoolp_mirror_fetch(): call rtl_fetch_mirror_urls_git() vs. rtl_fetch_urls_git(). pkgtool.sh:pkgtoolp_mirror_fetch(): symlink instead of downloading given package w/ parent package. pkgtool.sh:pkgtoolp_mirror{,_fetch}(): split archives vs. Git repositories directory name. subr.rtl/rtl_fetch.subr: factor out ${DEFAULT_GIT_ARGS}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): initial implementation. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): always return on failure. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): correctly attempt to git-clone(1) from ${PKG_URL} and then via ${PKG_MIRRORS}. subr.rtl/rtl_fetch.subr:{rtlp_fetch_url_git,rtl_fetch_urls_git}(): cleanup. {subr/pkg_fetch_download.subr,vars/{gcc,python[23]{,_host}}.vars}: call rtl_fetch_urls_git() w/ ${PKG_NAME} and ${PKG_MIRRORS_GIT:-}.
2021-01-23subr.rtl/rtl_fetch.subr:{rtlp_fetch_url_git,rtl_fetch_urls_git}(): ↵Lucio Andrés Illanes Albornoz1-4/+6
{receive,pass} ${_pkg_name}. subr.rtl/rtl_fetch.subr:rtl_fetch_urls_git(): return 1 on failure from rtlp_fetch_url_git(). subr/pkg_fetch_download.subr: pass ${PKG_NAME} to rtl_fetch_urls_git(). etc/README.md: updated.
2021-01-23Implements setting up & fetching from mirrors.Lucio Andrés Illanes Albornoz1-80/+79
etc/pkgtool.usage: updated. etc/README.md: updated. pkgtool.sh:pkgtoolp_mirror{,_fetch}(): initial implementation. subr/pkg_fetch_download.subr: default to empty ${PKG_MIRRORS}. subr/pkg_fetch_download.subr: factor out ${ARG_FETCH_FORCE} check and ${BUILD_DLCACHEDIR}. subr/pkgtool_init.subr: updated. subr.rtl/rtl_fetch.subr:rtl_fetch_urls_{git,wget}(): factor out ${ARG_FETCH_FORCE} check and ${BUILD_DLCACHEDIR}; minor cleanup. subr.rtl/rtl_fetch.subr:rtl_fetch_url_wget(): return vs. exit on fatal failure. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): copy only if ${_cache_dname} != ${_tgtdir}. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): return if unable to git-clone(1). subr.rtl/rtl_fetch.subr:{rtlp_fetch_url_git,rtl_fetch_urls_git}(): implement Git repository mirroring. vars/{gcc,python[23]{,_host}}.vars: updated.
2021-01-22Implements ${{DEFAULT,PKG,...}_MIRRORS}.Lucio Andrés Illanes Albornoz1-4/+8
build.sh:build(): define and zero-initialise ${DEFAULT_MIRRORS}. etc/README.md: updated. midipix.env: adds ${DEFAULT_MIRRORS} (https://midipix.org/mirror/ https://midipix.lucioillanes.de/archives/). subr.rtl/rtl_fetch.subr:rtl_fetch_url_wget(): receive and operate on target name and optional list of mirrors. subr/pkg_fetch_download.subr: additionally pass ${PKG_NAME} and ${PKG_MIRRORS} to rtl_fetch_url_wget().
2020-12-30subr/rtl*.subr, subr.rtl/: moved.Lucio Andrés Illanes Albornoz9-0/+957
subr/build_init.subr:buildp_init_env(): updated. subr/pkgtool_init.subr:pkgtoolp_init_env(): updated.