SHA256
1
0
forked from pool/homeshick
Dominique Leuenberger 2023-05-16 12:16:32 +00:00 committed by Git OBS Bridge
commit 3decb770e0
10 changed files with 96 additions and 62 deletions

3
bats-assert-2.0.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15dbf1abb98db785323b9327c86ee2b3114541fe5aa150c410a1632ec06d9903
size 14175

3
bats-file-0.3.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54d1c8b1908608aef8e46ac17d4001a75119e279662aeac4e5859ce780515362
size 19235

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f
size 10403

View File

@ -1,12 +0,0 @@
--- homeshick-2.0.0/test/helper.bash.orig 2022-11-16 22:11:08.095666823 +0100
+++ homeshick-2.0.0/test/helper.bash 2022-11-16 22:12:58.279790390 +0100
@@ -75,6 +75,9 @@
mk_structure
# shellcheck source=homeshick.sh
source "$HOMESHICK_FN_SRC_SH"
+
+ git config --global init.defaultBranch master
+ git config --global protocol.file.allow always
}
function setup {

3
homeshick-2.0.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:949f5de3c7f235ceb37c08e0cc8f3f7ad166f741a8fd01bf4b935a2031e37557
size 39207

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Tue May 16 09:19:27 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Use autosetup and POSIX tar options.
-------------------------------------------------------------------
Sat May 13 16:51:17 UTC 2023 - Olav Reinert <seroton10@gmail.com>
- Upgrade to version 2.0.1:
* Improvements to testing (@oreinert)
* Test up to and including bash v5.2.9
* Improvements to cd and check subcommands (@me-and)
* Improvement to cd subcommand in fish (@languitar)
- Remove patch git-config-for-tests.patch:
* Included by upstream
- Add patch test-helper.patch:
* Allows tests to run on OBS; does not alter package contents
-------------------------------------------------------------------
Wed Nov 16 21:17:12 UTC 2022 - Olav Reinert <seroton10@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package homeshick
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,17 +17,20 @@
Name: homeshick
Version: 2.0.0
Version: 2.0.1
Release: 0
Summary: Dotfile synchronizer based on Git and Bash
License: MIT
Group: Productivity/File utilities
URL: https://github.com/andsens/homeshick
Source0: https://github.com/andsens/homeshick/archive/v%{version}.tar.gz
Source0: https://github.com/andsens/homeshick/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: README-openSUSE.md
Source50: https://github.com/bats-core/bats-file/archive/v0.3.0.tar.gz#/bats-file-0.3.0.tar.gz
Source51: https://github.com/bats-core/bats-support/archive/v0.3.0.tar.gz#/bats-support-0.3.0.tar.gz
Source52: https://github.com/bats-core/bats-assert/archive/v2.0.0.tar.gz#/bats-assert-2.0.0.tar.gz
Source99: homeshick.rpmlintrc
Patch0: suse-packaging.patch
Patch1: git-config-for-tests.patch
Patch1: test-helper.patch
BuildRequires: expect
BuildRequires: git >= 1.5
BuildRequires: iputils
@ -51,9 +54,13 @@ plugins without clutter. It also makes it easy to install large external
frameworks, such as oh-my-zsh, found on sites like https://dotfiles.github.io/.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%autosetup -p1
# unpack test libraries
mkdir -p test/bats/lib
for lib in file support assert; do
tar -xf %{_sourcedir}/bats-$lib-*.tar.gz -C test/bats/lib --transform "s/bats-$lib-...../$lib/"
done
%build
@ -67,7 +74,7 @@ cp %{SOURCE1} .
%check
# run tests if bats is available
if type bats &>/dev/null; then
HOMESHICK_DIR=%{buildroot}%{_datadir}/%{name} bats test/suites
HOMESHICK_DIR=%{buildroot}%{_datadir}/%{name} HOMESHICK_TEST_DIR="$PWD" bats test/suites
fi
%files

View File

@ -1,20 +1,18 @@
diff -r -u homeshick-1.1.0-orig/bin/homeshick homeshick-1.1.0/bin/homeshick
--- homeshick-1.1.0-orig/bin/homeshick 2018-04-12 21:52:30.000000000 +0200
+++ homeshick-1.1.0/bin/homeshick 2018-06-07 21:42:03.651248460 +0200
--- homeshick-2.0.1/bin/homeshick.orig 2023-04-14 22:54:17.855182545 +0200
+++ homeshick-2.0.1/bin/homeshick 2023-04-14 22:55:01.868514856 +0200
@@ -1,8 +1,8 @@
-#!/usr/bin/env bash
+#!/bin/bash
+#!/usr/bin/bash
repos="$HOME/.homesick/repos"
# Include all helper functions. We will include the required command function later on.
-homeshick=${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}
+homeshick=${HOMESHICK_DIR:-/usr/share/homeshick}
# On travis-ci exit_status for some reason errors out, ignore it
# shellcheck disable=SC1090
# shellcheck source=../lib/exit_status.sh
source "$homeshick/lib/exit_status.sh"
diff -r -u homeshick-1.1.0-orig/homeshick.csh homeshick-1.1.0/homeshick.csh
--- homeshick-1.1.0-orig/homeshick.csh 2018-04-12 21:52:30.000000000 +0200
+++ homeshick-1.1.0/homeshick.csh 2018-06-07 21:35:03.398240964 +0200
# shellcheck source=../lib/fs.sh
--- homeshick-2.0.1/homeshick.csh.orig 2023-04-14 22:53:32.849717688 +0200
+++ homeshick-2.0.1/homeshick.csh 2023-04-14 22:54:03.522712974 +0200
@@ -1,6 +1,6 @@
# This helper script should be sourced via an alias, e.g.
#
@ -31,40 +29,30 @@ diff -r -u homeshick-1.1.0-orig/homeshick.csh homeshick-1.1.0/homeshick.csh
+ /usr/share/homeshick/bin/homeshick $*
endif
endif
diff -r -u homeshick-1.1.0-orig/homeshick.fish homeshick-1.1.0/homeshick.fish
--- homeshick-1.1.0-orig/homeshick.fish 2018-04-12 21:52:30.000000000 +0200
+++ homeshick-1.1.0/homeshick.fish 2018-06-07 21:35:03.398240964 +0200
--- homeshick-2.0.1/homeshick.fish.orig 2023-04-14 22:53:32.853717802 +0200
+++ homeshick-2.0.1/homeshick.fish 2023-04-14 22:54:03.522712974 +0200
@@ -1,5 +1,5 @@
# This script should be sourced in the context of your shell like so:
-# source $HOME/.homesick/repos/homeshick/homeshick.fish
+# source /usr/share/homeshick/homeshick.fish
# Alternatively, it can be installed into one of the directories
# that fish uses to autoload functions (e.g ~/.config/fish/functions)
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.
@@ -9,6 +9,6 @@
else if set -q HOMESHICK_DIR
eval $HOMESHICK_DIR/bin/homeshick (string escape -- $argv)
else
- eval $HOME/.homesick/repos/homeshick/bin/homeshick (string escape -- $argv)
+ eval /usr/share/homeshick/bin/homeshick (string escape -- $argv)
end
@@ -13,6 +13,6 @@
else if set homeshick (type -P homeshick 2> /dev/null)
eval $homeshick (string escape -- $argv)
else
- eval $HOME/.homesick/repos/homeshick/bin/homeshick (string escape -- $argv)
+ eval /usr/share/homeshick/bin/homeshick (string escape -- $argv)
end
end
diff -r -u homeshick-1.1.0-orig/homeshick.sh homeshick-1.1.0/homeshick.sh
--- homeshick-1.1.0-orig/homeshick.sh 2018-04-12 21:52:30.000000000 +0200
+++ homeshick-1.1.0/homeshick.sh 2018-06-07 21:40:18.111999430 +0200
@@ -1,6 +1,5 @@
-#!/usr/bin/env sh
# This script should be sourced in the context of your shell like so:
-# source $HOME/.homesick/repos/.homeshick/homeshick.sh
+# source /usr/share/homeshick/homeshick.sh
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.
@@ -10,6 +9,6 @@
# shellcheck disable=SC2164
cd "$HOME/.homesick/repos/$2"
else
- "${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@"
+ "${HOMESHICK_DIR:-/usr/share/homeshick}/bin/homeshick" "$@"
fi
--- homeshick-2.0.1/homeshick.sh.orig 2023-04-14 22:53:32.853717802 +0200
+++ homeshick-2.0.1/homeshick.sh 2023-04-14 22:54:03.522712974 +0200
@@ -10,6 +10,6 @@
# shellcheck disable=SC2164
cd "$HOME/.homesick/repos/$2"
else
- "${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@"
+ "${HOMESHICK_DIR:-/usr/share/homeshick}/bin/homeshick" "$@"
fi
}

24
test-helper.patch Normal file
View File

@ -0,0 +1,24 @@
--- homeshick-2.0.1/test/helper.sh.orig 2023-05-13 19:53:54.462114112 +0200
+++ homeshick-2.0.1/test/helper.sh 2023-05-13 20:10:46.242708858 +0200
@@ -16,8 +16,10 @@
}
determine_homeshick_dir() {
- HOMESHICK_DIR=$(cd "$BATS_TEST_DIRNAME/../.." && echo "$PWD")
- export HOMESHICK_DIR
+ if [ -z "$HOMESHICK_DIR" ]; then
+ HOMESHICK_DIR=$(cd "$BATS_TEST_DIRNAME/../.." && echo "$PWD")
+ export HOMESHICK_DIR
+ fi
}
create_test_dir() {
@@ -67,7 +69,7 @@
local name=$1
if [[ ! -e "$REPO_FIXTURES/$name" ]]; then
# shellcheck disable=SC1090
- source "$HOMESHICK_DIR/test/fixtures/$name.sh"
+ source "$HOMESHICK_TEST_DIR/test/fixtures/$name.sh"
fi
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:14a538bfc2e7cb6bfd35c984cdedbf3d3293413a70cc67f685dbfbd33ce64fdd
size 33094