From 4da46a9821deed5201a1c21c1d34da9e291a04e9 Mon Sep 17 00:00:00 2001 From: Tomoaki AOKI Date: Sat, 11 May 2024 02:25:58 +0900 Subject: [PATCH] Revert "Add poudlist-all.sh, fixed my name in LICENSE." My email address was not yet configured. This reverts commit 97cc895f700c853d9a48a8d36085b9f3a2d0cc66. --- LICENSE | 2 +- README.md | 5 +-- poudlist-all/README.md | 42 ---------------------- poudlist-all/poudlist-all.sh | 67 ------------------------------------ 4 files changed, 2 insertions(+), 114 deletions(-) delete mode 100644 poudlist-all/README.md delete mode 100755 poudlist-all/poudlist-all.sh diff --git a/LICENSE b/LICENSE index 36e89bc..a98b9e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2024 Tomoaki Aoki +Copyright (c) 2024 TomAoki Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 99591d7..6e3dd26 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ # sh_scripts -Sharable (bourne) shell scripts. -Currently available: - -[poudlist-all.sh](poudlist-all.sh/README.md) +Sharable shell (bourne shell) scripts \ No newline at end of file diff --git a/poudlist-all/README.md b/poudlist-all/README.md deleted file mode 100644 index 60f9d7b..0000000 --- a/poudlist-all/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# poudlist-all.sh - -## Description -A small script to generate a list of all ports installed, excluding leaf ports which you don't want to be rebuilt in conjunction of others.
-The author created this script because `poudriere bulk -a -j jailname` forces rebuilding ALL ports, which any of ports they depends on are updated, regardless it's too time-consuming or not. - -## Usage -No command line arguments.Simply run it as a bourne shell script.
-Once the resulting list is generated (default: /poudriere/pkglist.all), you can run `poudriere bulk -f /poudriere/pkglist.all -j jailname` and rebuild too huge monster leaves once it finishes. - -## Configuing the script -No configuration files are supported.
-You need to edit the script and set variables in it. - -### Variables for configuration -#### BLOCKLISTS -ports origins you want to block from building.
-Each origins must be the form poudriere can accept.
-Note that poudriere does not block building listed ports if it is depended upon by any non-listed ports. - -Beware! If the origin is NOT a leaf ports, you must specify ALL origins of the ports/pkgs which depends on it, for example, japanese/libreoffice as the actual leaf of editors/libreoffice must be specified in conjunction with editors/libreoffice. - -#### PORTSDIR -The directory where ports tree to be used exists.
-Default is where vanilla FreeBSD expects: /usr/ports - -#### LISTDIR -The directory where the list is generated.
-Default is: /poudriere - -#### LISTFILE -The file name of the list to be generated.
-Default is: pkglist.all - -#### TMPDIR -The directory where temporary working file is generated.
-Requires Read/Write permission for the user running this script. - -#### TMPFILE -The file name of the temporary working file to be used.
-Default is the string of LISTFILE appended uid, date and time.
-So would be no need to modify. diff --git a/poudlist-all/poudlist-all.sh b/poudlist-all/poudlist-all.sh deleted file mode 100755 index 54bad53..0000000 --- a/poudlist-all/poudlist-all.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2024 Tomoaki AOKI -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -# Configurations - -BLOCKLISTS="japanese/libreoffice editors/libreoffice \ -www/chromium www/firefox \ -www/linux-widevine-cdm" - -PORTSDIR=/usr/ports -LISTDIR=/poudriere -LISTFILE=pkglist.all -TMPDIR=/tmp -TMPFILE=${LISTFILE}-`id -u`-`date "+%Y%m%d%H%M%S"` - - -echo Output = ${LISTDIR}/${LISTFILE} -echo Temporary = ${TMPDIR}/${TMPFILE} - - -# Cleanup old lists if exists, and rotate list. - -if [ -f ${LISTDIR}/${LISTFILE}.old ] ; then rm ${LISTDIR}/${LISTFILE}.old ; fi -if [ -f ${LISTDIR}/${LISTFILE} ] ; then mv ${LISTDIR}/${LISTFILE} ${LISTDIR}/${LISTFILE}.old ; fi -if [ -f ${LISTDIR}/${LISTFILE}.old ] ; then chmod 666 ${LISTDIR}/${LISTFILE}.old ; fi - - -# Regenerate list with newly installed ports. - -for PORT in `pkg version -o | cut -f 1 -w` ; do - FLG=NO - for NONEED in ${BLOCKLISTS} ; do - if [ ${PORT} = ${NONEED} ] ; then FLG="YES" ; fi - done - rg "${PORT}\|\|" ${PORTSDIR}/MOVED > /dev/null - RET=$? - if [ 0 -eq $((RET)) ] ; then FLG="YES" ; fi - if [ "NO" = ${FLG} ] ; then echo ${PORT} >> ${TMPDIR}/${TMPFILE} ; fi -done - -sort ${TMPDIR}/${LISTFILE} | uniq > ${LISTDIR}/${LISTFILE} -chmod 666 ${LISTDIR}/${LISTFILE} -rm ${TMPDIR}/${TMPFILE}