From 282f6051b5e102220f62f5befa6cadea77b07ff2 Mon Sep 17 00:00:00 2001 From: Gilver Date: Thu, 13 Feb 2025 10:30:35 -0600 Subject: [PATCH] Fix (uutils-coreutils-replace): Symlinks and cleanup (#3297) * Delete anda/system/uutils-coreutils-replace/coreutils-colorls.csh Signed-off-by: Gilver * Delete anda/system/uutils-coreutils-replace/coreutils-colorls.sh Signed-off-by: Gilver * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Signed-off-by: Gilver * Always the rel bump. ALWAYS THE Signed-off-by: Gilver * Why not Signed-off-by: Gilver * /usr/bin path Signed-off-by: Gilver * Back to BUILDDIR Signed-off-by: Gilver * More sums Signed-off-by: Gilver * I don't want to overcomplicate this I guess Signed-off-by: Gilver * Update uutils-coreutils-replace.spec Signed-off-by: Gilver * Fix Signed-off-by: Gilver --------- Signed-off-by: Gilver --- .../coreutils-colorls.csh | 63 ------------------- .../coreutils-colorls.sh | 53 ---------------- .../uutils-coreutils-replace.spec | 33 ++++------ 3 files changed, 11 insertions(+), 138 deletions(-) delete mode 100644 anda/system/uutils-coreutils-replace/coreutils-colorls.csh delete mode 100644 anda/system/uutils-coreutils-replace/coreutils-colorls.sh diff --git a/anda/system/uutils-coreutils-replace/coreutils-colorls.csh b/anda/system/uutils-coreutils-replace/coreutils-colorls.csh deleted file mode 100644 index 66ec2fa8d2..0000000000 --- a/anda/system/uutils-coreutils-replace/coreutils-colorls.csh +++ /dev/null @@ -1,63 +0,0 @@ -# skip everything for non-interactive shells -if (! $?prompt) exit - -# color-ls initialization -if ( $?USER_LS_COLORS ) then - if ( "$USER_LS_COLORS" != "" ) then - #when USER_LS_COLORS defined do not override user - #specified LS_COLORS and use them - goto finish - endif -endif - -alias ll 'ls -l' -alias l. 'ls -d .*' -set COLORS=/etc/DIR_COLORS - -if ($?TERM) then - if ( -e "/etc/DIR_COLORS.$TERM" ) then - set COLORS="/etc/DIR_COLORS.$TERM" - endif -endif -if ( -f ~/.dircolors ) set COLORS=~/.dircolors -if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors -if ($?TERM) then - if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM" - if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM" -endif -set INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`" - -if ( ! -e "$COLORS" ) exit - -set _tmp="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`" -#if mktemp fails, exit when include was active, otherwise use $COLORS file -if ( "$_tmp" == '' ) then - if ( "$INCLUDE" == '' ) then - eval "`/usr/bin/dircolors -c $COLORS`" - endif - goto cleanup -endif - -if ( "$INCLUDE" != '' ) /usr/bin/cat "$INCLUDE" >> $_tmp -/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $_tmp - -eval "`/usr/bin/dircolors -c $_tmp`" - -/usr/bin/rm -f $_tmp - -if ( "$LS_COLORS" == '' ) exit -cleanup: -set color_none=`/usr/bin/sed -n '/^COLOR.*none/Ip' < $COLORS` -if ( "$color_none" != '' ) then - unset color_none - exit -endif -unset color_none -unset _tmp -unset INCLUDE -unset COLORS - -finish: -alias ll 'ls -l --color=auto' -alias l. 'ls -d .* --color=auto' -alias ls 'ls --color=auto' diff --git a/anda/system/uutils-coreutils-replace/coreutils-colorls.sh b/anda/system/uutils-coreutils-replace/coreutils-colorls.sh deleted file mode 100644 index 5162f1e39c..0000000000 --- a/anda/system/uutils-coreutils-replace/coreutils-colorls.sh +++ /dev/null @@ -1,53 +0,0 @@ -# color-ls initialization - -# Skip all for noninteractive shells. -[ ! -t 0 ] && return - -#when USER_LS_COLORS defined do not override user LS_COLORS, but use them. -if [ -z "$USER_LS_COLORS" ]; then - - alias ll='ls -l' 2>/dev/null - alias l.='ls -d .*' 2>/dev/null - - INCLUDE= - COLORS= - - for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \ - "$HOME/.dir_colors" "$HOME/.dircolors"; do - [ -e "$colors" ] && COLORS="$colors" && \ - INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`" && \ - break - done - - [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \ - COLORS="/etc/DIR_COLORS.$TERM" - - [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \ - COLORS="/etc/DIR_COLORS" - - # Existence of $COLORS already checked above. - [ -n "$COLORS" ] || return - - if [ -e "$INCLUDE" ]; - then - TMP="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`" - [ -z "$TMP" ] && return - - /usr/bin/cat "$INCLUDE" >> $TMP - /usr/bin/grep -v '^INCLUDE' "$COLORS" >> $TMP - - eval "`/usr/bin/dircolors --sh $TMP 2>/dev/null`" - /usr/bin/rm -f $TMP - else - eval "`/usr/bin/dircolors --sh $COLORS 2>/dev/null`" - fi - - [ -z "$LS_COLORS" ] && return - /usr/bin/grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return -fi - -unset TMP COLORS INCLUDE - -alias ll='ls -l --color=auto' 2>/dev/null -alias l.='ls -d .* --color=auto' 2>/dev/null -alias ls='ls --color=auto' 2>/dev/null diff --git a/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec b/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec index 5a86590f55..71a27ffd2c 100644 --- a/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec +++ b/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec @@ -6,7 +6,7 @@ Name: uutils-coreutils-replace Version: 0.0.29 -Release: 1%?dist +Release: 2%?dist Summary: Cross-platform Rust rewrite of the GNU coreutils License: MIT URL: https://github.com/uutils/coreutils @@ -41,7 +41,7 @@ This package replaces the GNU coreutils commands. %prep %setup -q -n coreutils-%version %cargo_prep_online -cp %{SOURCE3} . +/usr/bin/cp %{SOURCE3} . sed dircolors.hin \ -e 's| 00;36$| 01;36|' \ > DIR_COLORS @@ -54,25 +54,19 @@ sed dircolors.hin \ %build %install -export CARGOFLAGS="-vv --verbose" install -p -c -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/colorls.sh install -p -c -Dm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/colorls.csh install -p -c -Dm644 DIR_COLORS{,.lightbgcolor} %{buildroot}%{_sysconfdir} /usr/bin/rm dircolors.hin DIR_COLORS DIR_COLORS.lightbgcolor %make_install PROFILE_CMD='--profile=rpm' MULTICALL=n DESTDIR=%buildroot BUILDDIR=target/rpm PREFIX=%_prefix SELINUX_ENABLED=1 SKIP_UTILS='hostname kill more uptime' & wait -ln -sr hashsum %{buildroot}%{_bindir}/sha1sum -ln -sr hashsum %{buildroot}%{_bindir}/sha224sum -ln -sr hashsum %{buildroot}%{_bindir}/sha256sum -ln -sr hashsum %{buildroot}%{_bindir}/sha384sum -ln -sr hashsum %{buildroot}%{_bindir}/sha512sum -ln -sr hashsum %{buildroot}%{_bindir}/sha3-224sum -ln -sr hashsum %{buildroot}%{_bindir}/sha3-256sum -ln -sr hashsum %{buildroot}%{_bindir}/sha3-384sum -ln -sr hashsum %{buildroot}%{_bindir}/sha3-512sum -ln -sr hashsum %{buildroot}%{_bindir}/sha3sum -ln -sr hashsum %{buildroot}%{_bindir}/shake128sum -ln -sr hashsum %{buildroot}%{_bindir}/shake256sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/b2sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/md5sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha1sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha224sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha256sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha384sum +/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha512sum %define cmds() $(echo %1{runcon,arch,base{32,64,name,nc},cat,ch{grp,mod,own,root,con},cksum,comm,cp,csplit,cut,date,dd,df,dir{,colors,name},du,echo,env,expand,expr,factor,false,fmt,fold,groups,hashsum,head,host{id},id,install,join,link,ln,logname,ls,mk{dir,fifo,nod,temp},mv,nice,nl,nohup,nproc,numfmt,od,paste,pathchk,pinky,pr,printenv,printf,ptx,pwd,readlink,realpath,rm{,dir},seq,shred,shuf,sleep,sort,split,stat,stdbuf,sum,sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty,uname,un{expand,iq,link},users,vdir,wc,who{,ami},yes}%2) cat < files.txt @@ -95,18 +89,13 @@ cat files.txt %files -f files.txt %doc README.md %license LICENSE +%{_bindir}/b2sum +%{_bindir}/md5sum %{_bindir}/sha1sum %{_bindir}/sha224sum %{_bindir}/sha256sum %{_bindir}/sha384sum %{_bindir}/sha512sum -%{_bindir}/sha3-224sum -%{_bindir}/sha3-256sum -%{_bindir}/sha3-384sum -%{_bindir}/sha3-512sum -%{_bindir}/sha3sum -%{_bindir}/shake128sum -%{_bindir}/shake256sum %config(noreplace) %{_sysconfdir}/DIR_COLORS %config(noreplace) %{_sysconfdir}/DIR_COLORS.lightbgcolor %{_sysconfdir}/profile.d/colorls.sh